package com.stillalive.mq.mqclient;

import lombok.Getter;
import lombok.Setter;

import java.io.IOException;

@Getter
@Setter
public class ConnectionFactory {
    // broker server的ip地址
    private String host;
    // broker server 的端口号
    private int port;

    // broker server 访问哪个虚拟主机
    // 这里只有一个虚拟主机，就不考虑了
//    private String virtualHostName;
//    private String userName;
//    private String password;
    public Connection newConnection() throws IOException {
        Connection connection = new Connection(host, port);
        return connection;
    }
}
